#pragma once

#include "TxDNN/common.h"

namespace txdnn {
/**
 * ILogger: can be put as project header 
 */
class ILogger {
public:
  enum class Level : int32_t {
    Emergent, 
    Alert,
    Critical,
    Error,
    Warning,
    Notice,
    Info,
    Debug,
    Verbose,
    Invalid = 99,
  };

public:
  ROOT_INTERFACE(ILogger);

  virtual void log(Level level, const char* msg) _TX_NOEXCEPT = 0;
  virtual bool isLogLevelEnabled(Level level) _TX_NOEXCEPT = 0;
};
} // namespace txdnn

/*
 * TXDNN_GetDefaultLogger Declaration
 */
extern "C" TXDNNAPI txdnn::ILogger* TXDNN_GetDefaultLogger(
  const char* file_path = nullptr,
  txdnn::ILogger::Level level = txdnn::ILogger::Level::Error
) _TX_NOEXCEPT;


/* initLogger */
void initLogger(txdnn::ILogger* logger = nullptr,
                std::string file_path = nullptr, 
                txdnn::ILogger::Level level = txdnn::ILogger::Level::Debug) _TX_NOEXCEPT;